<fieldset>

<?php $form=$this->beginWidget('BootstrapActiveForm', array(
	'id'=>'contest-form',
	'enableAjaxValidation'=>true,
)); ?>

	<?php echo $form->textFieldBlock($model,'name',array('class'=>'xlarge','maxlength'=>255)); ?>

	<?php echo $form->textAreaBlock($model,'description',array('class'=>'xlarge','rows'=>6)); ?>

	<?php echo $form->dropDownListBlock($model,'prizeId',CHtml::listData(Prize::model()->findAll(),'id','name')); ?>

	<div class="clearfix">
		<?php echo $form->labelEx($model,'submitStart'); ?>
		<div class="input">
			<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
				'model'=>$model,
				'attribute'=>'submitStart',
				'options'=>array('dateFormat'=>'yy-mm-dd'),
				'htmlOptions'=>array('class'=>'date-field'),
			)); ?>
			<?php echo $form->error($model,'submitStart'); ?>
		</div>
	</div>

	<div class="clearfix">
		<?php echo $form->labelEx($model,'submitEnd'); ?>
		<div class="input">
			<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
				'model'=>$model,
				'attribute'=>'submitEnd',
				'options'=>array('dateFormat'=>'yy-mm-dd'),
				'htmlOptions'=>array('class'=>'date-field'),
			)); ?>
			<?php echo $form->error($model,'submitEnd'); ?>
		</div>
	</div>

	<div class="clearfix">
		<?php echo $form->labelEx($model,'voteStart'); ?>
		<div class="input">
			<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
				'model'=>$model,
				'attribute'=>'voteStart',
				'options'=>array('dateFormat'=>'yy-mm-dd'),
				'htmlOptions'=>array('class'=>'date-field'),
			)); ?>
			<?php echo $form->error($model,'voteStart'); ?>
		</div>
	</div>

	<div class="clearfix">
		<?php echo $form->labelEx($model,'voteEnd'); ?>
		<div class="input">
			<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
				'model'=>$model,
				'attribute'=>'voteEnd',
				'options'=>array('dateFormat'=>'yy-mm-dd'),
				'htmlOptions'=>array('class'=>'date-field'),
			)); ?>
			<?php echo $form->error($model,'voteEnd'); ?>
		</div>
	</div>

	<div class="actions">
		<?php echo CHtml::submitButton(Yii::t('admin','Save'),array('class'=>'btn primary')); ?>
	</div>

<?php $this->endWidget(); ?>

</fieldset>